package com.yujiahao.app;
import java.util.ArrayList;
import java.util.Collections;

/**
 * @Description: 曾仕强老师讲的易经最简单的起卦，掷铜钱生成易经卦象
 * @Author: yujiahao
 * @Date: 2024/1/4 14:54
 * @Version: 1.0
 */

public class PaoYingBi {


        public static void main(String[] args) {
            ArrayList<String> results = new ArrayList<>();
            for (int j = 0; j < 6; j++) {
                int sum = 0;
                for (int i = 0; i < 3; i++) {
                    int randomNum = (Math.random() <= 0.5) ? 2 : 3;
                    sum += randomNum;
                }
//                System.out.println(sum);
                if (sum % 2 == 0) {
                    results.add("—— ——");
                } else {
                    results.add("—————");
                }
            }

            Collections.reverse(results);
            for(String result : results) {
                System.out.println(result);
            }
        }

}
